package com.sdgakj.study.thread.pc.sychronized;

/**
 * @Author: Du Ronghong
 * @Description:
 * @Date: Created in 17:45 2018/8/28
 * @Modified By:
 */
public class Test {
    public static void main(String[] args) {
        Food food = new Food();
        new Thread(new Product(food),"生产者 A").start();
        new Thread(new Product(food),"生产者 B").start();
        new Thread(new Product(food),"生产者 C").start();
        new Thread(new Consumer(food),"consumer A").start();
        new Thread(new Consumer(food),"consumer B").start();
        new Thread(new Consumer(food),"consumer C").start();
    }
}
